<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
	<head>
		<head>
			<base href="<%=basePath%>">
			<meta charset="utf-8" />
			<title>校园招聘</title>
			<link rel="stylesheet" href="css/bootstrap.min.css">
			<link href="css/content.css" rel="stylesheet">
			<link href="css/footer.css" rel="stylesheet">
			<script type="text/javascript" src="js/jquery-3.4.1.js"></script>
			<script type="text/javascript" src="js/bootstrap.min.js"></script>
		</head>

	<body>
		<!-- 导入导航栏 -->
		<jsp:include page="/common/header.jsp"></jsp:include>
		<!-- 分割 -->
		<div style="height: 20px;"></div>


		<div class="container" style="height:400px; text-align: center;">
			<div class="row">
				<div class="span12">
					<form action="find/pubposition" method="post" onsubmit="return check6()">
						<fieldset>
							<legend>发布求职信息</legend>

							<table class="table">

								<tr>
									<td>
										<label>职位名称:</label>
									</td>
									<td>
										<input type="hidden" name="cId" value="${user.id }">
										<input type="text" style="height:30px" name="name" onblur="check1(this.value)" />
									</td>
								</tr>
								<tr>
									<td>
										<label>任职地点:</label>
									</td>
									<td>
										<input type="text" style="height:30px" name="location" onblur="check2(this.value)" />
									</td>
								</tr>
								<tr>
									<td>
										<label>学历要求:</label>
									</td>
									<td>
										<select name="degree"  onblur="check3(this.value)">
										<option selected>请选择</option>
										<option>高中及以下</option>
										<option>大专</option>
										<option>本科</option>
										<option>硕士</option>
										<option>博士</option>
									</select>
									</td>
								</tr>
								<tr >
									<td>
										<label>意向薪资:</label>
									</td>
									<td>
										<select name="salary" name="salary" onblur="check4(this.value)">
											<option selected>请选择</option>
											<option>3k以下</option>
											<option>3k-4k</option>
											<option>3k-4k</option>
											<option>4k-5k</option>
											<option>5k-6k</option>
											<option>7k-8k</option>
											<option>8k以上</option>
										</select>
									</td>
								</tr>
								
								
								
								<tr >
									<td>
										<label>职位要求:</label>
									</td>
									<td>
										<textarea rows="2" cols="30" name="tip" onblur="check5(this.value)"></textarea>
									</td>
								</tr>
								
								<tr >
									<td colspan="2">
									<input type="submit" class="btn" />
									</td>
								</tr>
								</tbody>
							</table>
							
						</fieldset>
						<font align="center" style="color:red;font-size:15px;">${sessionScope.pubflag}</font>
						<c:remove var="pubflag"/>
					</form>
				</div>
			</div>
		</div>

		<!-- 导入底部信息 -->
		<jsp:include page="/common/footer.jsp"></jsp:include>
		<script type="text/javascript">
			var t1 = t2 = t3 = t4 = t5 = 0;

			function check1(t) {
				if (t == "") {
					t1 = 0;
				} else {
					t1 = 1;
				}


			}

			function check2(t) {
				if (t == "") {
					t2 = 0;
				} else {
					t2 = 1;
				}


			}

			function check3(t) {
				if (t == "请选择") {
					t3 = 0;
				} else {
					t3 = 1;
				}

			}
			function check4(t) {
				if (t == "请选择") {
					t4 = 0;
				} else {
					t4 = 1;
				}

			}
			function check5(t) {
				if (t == "") {
					t5 = 0;
				} else {
					t5 = 1;
				}


			}
			
			

			function check6() {
				if (t1 == 1 && t2 == 1 && t3 == 1 && t4 == 1 && t5 == 1) {
					return true;
				} else {
					alert("请填写完整信息！")
					return false;
				}

			}
		</script>
	</body>
</html>
